<template>
 <div>
<div>
  <h1>小黑记事本</h1>
</div>
<input type="text" v-model="name"><button @click="add">提交</button>
 </div>
</template>
<script>
export default{
    name:'',
    data () {
        return {
            name:''
        }
    },
    created () {
    },
    computed:{
    },
    methods:{
      add(){
        this.$emit('add',{
          id:Date.now(),
          name:this.name
        })
        this.name=''
      }
    }
}
</script>
<style lang='less'  scoped>
    
</style>
